/**
 * 
 */
package simpleFactory;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

/**
 * @author sz
 *
 * create time：2012-7-31
 */
public class test {

	public static void main(String []args){
		
		Operation oper = OperationFactory.createOperation("*");
		
		double a = 0;
		double b = 0;
		
		System.out.println("输入数字A");
		
		Scanner sc = new Scanner(System.in);
		
		a = sc.nextDouble();
	//	BufferedReader strin1=new BufferedReader(new InputStreamReader(System.in));
		
		System.out.println("输入数字B");
		
		b = sc.nextDouble();
		//BufferedReader strin2=new BufferedReader(new InputStreamReader(System.in));
//		
//		try {
//			// a = Double.parseDouble(strin1.readLine());
//			
//			// b = Double.parseDouble(strin2.readLine());
//			
//		} catch (NumberFormatException e) {
//		
//			e.printStackTrace();
//		} catch (IOException e) {
//			
//			e.printStackTrace();
//		}
		
		oper.setNumberA(a);
		
		oper.setNumberB(b);
		
		System.out.println(oper.GetResult());
		
	}
}
